package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.CityDictionary;
import com.ruoyi.system.domain.vo.DictRelevanceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 字典关联城市Mapper接口
 *
 * @author MagicCube
 * @date 2023-06-09
 */
@Mapper
public interface CityDictionaryMapper
{
    /**
     * 查询字典关联城市
     *
     * @param id 字典关联城市主键
     * @return 字典关联城市
     */
    public CityDictionary selectCityDictionaryById(Long id);

    /**
     * 查询字典关联城市列表
     *
     * @param cityDictionary 字典关联城市
     * @return 字典关联城市集合
     */
    public List<CityDictionary> selectCityDictionaryList(CityDictionary cityDictionary);

    /**
     * 新增字典关联城市
     *
     * @param cityDictionary 字典关联城市
     * @return 结果
     */
    public int insertCityDictionary(CityDictionary cityDictionary);

    /**
     * 修改字典关联城市
     *
     * @param cityDictionary 字典关联城市
     * @return 结果
     */
    public int updateCityDictionary(CityDictionary cityDictionary);

    /**
     * 删除字典关联城市
     *
     * @param id 字典关联城市主键
     * @return 结果
     */
    public int deleteCityDictionaryById(Long id);

    /**
     * 批量删除字典关联城市
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCityDictionaryByIds(Long[] ids);

    List<DictRelevanceVo> GroupByCity(DictRelevanceVo dictRelevanceVo);
    List<DictRelevanceVo> GroupByDict(DictRelevanceVo dictRelevanceVo);

    List<CityDictionary> selectCityDictListByCityIds(List<DictRelevanceVo> cityIds);

    List<CityDictionary> selectCityDictListByDictIds(List<DictRelevanceVo> dictIds);

    List<String> selectDictTypeListByDictIds(List<Long> list);

    String selectDictTypeListByCityIds(List<String> list);

    List<Long> selectCityInfoById(DictRelevanceVo dictRelevanceVo);
    List<String> selectDictInfoById(Long id);

    DictRelevanceVo selectCityDictById(Long id);

    int insertCityDictionarys(@Param("list") List<CityDictionary> list);

    int updateCityDict(DictRelevanceVo dictRelevanceVo);

    int deleteCityDictByCityIdAndDictTypeId(@Param("cityId") String cityId,@Param("dictionaryTypeId") Long dictionaryTypeId);

    int deleteCityDictByDictDataId(Long dictionaryId);
}
